#include "SurfaceContainerNode.h"

SurfaceContainerNode::SurfaceContainerNode() {}

SurfaceContainerNode::~SurfaceContainerNode() {
	delete data;
}

SurfaceContainer* SurfaceContainerNode::getNodeValue() const{
	return this->data;
}

void SurfaceContainerNode::setNodeValue(SurfaceContainer* value) {
	this->data = value;
}

SurfaceContainerNode::SurfaceContainerNode(const SurfaceContainerNode &surfaceContainerNode) {
	this->setNext(surfaceContainerNode.getNext());
	data = surfaceContainerNode.data;
}

SurfaceContainerNode& SurfaceContainerNode::operator=(const SurfaceContainerNode &surfaceContainerNode) {
	this->setNext(surfaceContainerNode.getNext());
	this->data = surfaceContainerNode.data;
	return *this;
}

SurfaceContainerNode* SurfaceContainerNode::clone() const {
	return new SurfaceContainerNode(*this);
}

bool SurfaceContainerNode::equals(const Node& node) const {
	if (typeid(&node) == typeid(this)) {
		SurfaceContainerNode& surfaceContainerNode = (SurfaceContainerNode&)node;
		if (this->getNodeValue()->getId().compare(surfaceContainerNode.getNodeValue()->getId()) == 0) {
			return true;
		}
	}
	return false;
}
